package com.tsxy.controller;

import com.tsxy.common.APIResult;
import com.tsxy.service.BookService;
import com.tsxy.service.BookSortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/bookSort")
public class BookSort {
    @Autowired
    private BookSortService bookSortService;
    @GetMapping
    public APIResult getAll(){
        List<BookSort> list = bookSortService.getAll();
        return APIResult.success(list);
    }
}
